// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store';
import urls from '@plugins/url';
import Moment from 'moment';
import iView from 'iview';
import $ from 'jquery';
import 'iview/dist/styles/iview.css';
import './style/base/_reset.less';
import './style/base/_base.less';
//  导入所有请求方法
import { post, get } from '@plugins/ajax/http.js';

Vue.use(iView);
Vue.use(urls);

//  向VUE的原型上添加请求方法
Vue.prototype.getRequest = get;
Vue.prototype.postRequest = post;
// 定义moment全局日期过滤器
Vue.filter('convertTime', function(data, formatStr) {
	return Moment(data).format(formatStr);
});

Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	store,
	components: { App },
	template: '<App/>'
});
